<div id="storeregister">
    <div class="nav">
        <a href="#agent/agentinfo">
            <div class="nav-li">市代信息</div>
        </a>
        <div class="nav-li focus">门店{{$Cache.agent.storeregister.store_id?"信息":"登记"}}</div>
        <a href="#agent/storelist">
            <div class="nav-li">门店列表</div>
        </a>
        <a href="#agent/finance">
            <div class="nav-li">账单详情</div>
        </a>
    </div>
    <hr />
    <div class="storeregister">
        <table>
            <tr>
                <td class="stitle" colspan="8">店长信息</td>
            </tr>
            <tr>
                <td class="title">联系人*</td>
                <td class="input">
                    <input bind-input="{{'$Cache.agent.storeregister.info.contacts'}}" bind-value="{{$Cache.agent.storeregister.info.contacts}}" type="text" placeholder="门店联系人" />
                </td>
                <td class="title">手机号*</td>
                <td class="input">
                    <input bind-input="{{'$Cache.agent.storeregister.info.mobile_phone'}}" bind-value="{{$Cache.agent.storeregister.info.mobile_phone}}" type="text" placeholder="手机号" />
                </td>
                <td class="title">邮箱</td>
                <td class="input">
                    <input bind-input="{{'$Cache.agent.storeregister.info.email'}}" bind-value="{{$Cache.agent.storeregister.info.email}}" type="text" placeholder="邮箱" />
                </td>
                <td class="title">QQ</td>
                <td class="input">
                    <input bind-input="{{'$Cache.agent.storeregister.info.qq'}}" bind-value="{{$Cache.agent.storeregister.info.qq}}" type="text" placeholder="QQ" />
                </td>
            </tr>
            <tr>
                <td class="stitle" colspan="8">门店信息</td>
            </tr>
            <tr>
                <td class="title">店名*</td>
                <td class="input">
                    <input bind-input="{{'$Cache.agent.storeregister.info.store_name'}}" bind-value="{{$Cache.agent.storeregister.info.store_name}}" type="text" placeholder="店名" />
                </td>
                <td class="title">营业时间</td>
                <td class="input">
                    <input bind-input="{{'$Cache.agent.storeregister.info.start_business_hours'}}" bind-value="{{$Cache.agent.storeregister.info.start_business_hours}}" type="time" placeholder="开始时间" /> -
                    <input bind-input="{{'$Cache.agent.storeregister.info.end_business_hours'}}" bind-value="{{$Cache.agent.storeregister.info.end_business_hours}}" type="time" placeholder="结束时间" />
                </td>
                <td class="title">座机</td>
                <td class="input">
                    <input bind-input="{{'$Cache.agent.storeregister.info.area_code'}}" bind-value="{{$Cache.agent.storeregister.info.area_code}}" type="text" placeholder="区号" />
                    <input bind-input="{{'$Cache.agent.storeregister.info.phone'}}" bind-value="{{$Cache.agent.storeregister.info.phone}}" type="text" placeholder="座机号码" />
                </td>
                <td colspan="2" rowspan="3">
                    <img src="{{$Cache.agent.storeregister.info.logo_img||'http://i1.mb5u.com/img/dface.jpg'}}" />
                    <button disabled="{{$Cache.agent.storeregister.is_logo_uploading}}" onclick="javascript:document.getElementById('storelogo').click()">{{$Cache.agent.storeregister.is_logo_uploading?"正在上传":"上传店铺logo"}}</button>
                    <input event-change="{{'$Event.agent.storeregister.upload_logo'}}" id="storelogo" type="file" accept="image/*" style="display: none;" />
                </td>
            </tr>
            <tr>
                <td class="title">详细地址*</td>
                <td class="input" colspan="5">
                    <input bind-input="{{'$Cache.agent.storeregister.info.adress'}}" bin-value="{{$Cache.agent.storeregister.info.adress}}" class="wide" type="text" placeholder="门店详细地址" />
                </td>
            </tr>
            <tr>
                <td class="stitle" colspan="6">门店图片</td>
            </tr>
            <tr>
                <td class="input" colspan="8">
                    <button onclick="javascript:document.getElementById('storeface').click()" style="margin-left: 0">上传门店图片(600*600)</button>
                    <input event-change="{{'$Event.agent.storeregister.add_store_img'}}" id="storeface" type="file" accept="image/*" style="display: none;" />
                    <div class="storeimgbox">
                        {{#each $Cache.agent.storeregister.info.store_imgs}}
                        <img event-click="{{'$Top.$Event.agent.storeregister.delete_store_img'}}" class="storeimg" bind-src="{{$This}}" /> {{/each}}
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title">介绍人手机号</td>
                <td colspan="7" class="input">
                    <input bind-input="{{'$Cache.agent.storeregister.info.introducer'}}" bind-value="{{$Cache.agent.storeregister.info.introducer}}" type="text" maxlength="11" placeholder="介绍人手机号（选填）" />
                </td>
            </tr>
        </table>
        <div class="submit">
            {{#if !$Cache.agent.storeregister.store_id}}
            <button event-click="{{'$Event.agent.storeregister.submit_data'}}">提交</button> {{/if}}
        </div>
    </div>
</div>